1. Field of the Invention
The present invention relates to a method and an apparatus for determining the boundary of an object and a storage medium containing a program for determining the boundary of an object. More particularly, the present invention relates to a method and apparatus for determining the boundary of an object by capturing an image of a particle such as a blood corpuscle or a cell through a microscope using a video camera or the like, storing the image in an image memory, and determining the boundary of the stored particle by image processing, and a storage medium containing a program for determining the boundary of an object.
2. Description of the Related Art
Generally, a characteristic property or a tendency of an object can be found by determining its shape. For example, a state of a living body can be found by examining a shape of a blood corpuscle or a cell contained in blood or urine. For this purpose, an image of a blood corpuscle or a cell (usually referred to as a "particle) is captured and a shape of the blood corpuscle or the cell is analyzed by image processing. Through this analysis, the outline (also referred to as the "edge" or the "boundary") of the particle is traced to calculate a perimeter or an area (characteristic parameter) of the particle, whereby the shape of the particle is numerically determined.
Conventional methods of analyzing a region in an image by observing its boundary are disclosed, for example, in "Method and Apparatus for Determining the Boundary of an Object" of Japanese Examined Patent Publication No. HEI 5(1993)-71991 (U.S. Pat. No. 4,538,299 issued on Aug. 27, 1985) and in "Image Processing Apparatus" of Japanese Unexamined Patent Publication No. SHO 63(1988)-301372 (U.S. Pat. No. 5,220,647 issued on Jun. 15, 1993).
According to the method disclosed in Japanese Examined Patent Publication No. HEI 5(1993)-71991, the following steps are carried out to trace the boundary of an object by image processing, as shown in FIG. 27.
Step 1:
An image of an object such as a blood corpuscle or a cell is captured. The captured image is subjected to A/D conversion to convert the luminance of each pixel into a multi-valued image (gray-scale image), which is then stored in a frame (image) memory. This gray-scale image is referred to as a first representation.
Step 2:
A threshold value is set so as to distinguish the object from background noises. By means of this threshold value, the multi-valued image is converted into a binary image, which is then stored in a different frame memory. This binary image is referred to as a second representation.
Step 3:
For each object pixel in the binary image, values of the object pixel and the 8-neighbor pixels adjacent to the object pixel in the surrounding eight directions are taken out and converted by means of a look-up table into a single value, which is then stored in another frame memory. Thus, a third representation of the image is formed. Through this step, only the pixels on the boundary of an object are allowed to have a non-zero value, and the pixels on the inside and outside of the object are allowed to have a value of "0".
Step 4:
The image of the third representation is raster-scanned to search for a pixel having a non-zero value. Once a pixel having a non-zero value is found, reference is made to a look-up table by using as parameters the value and the direction from which the scanning has proceeded in order to arrive at the pixel, thereby to determine the direction where the next pixel having a nonzero value would be found. Every time a pixel on the boundary portion is traced, the content of the memory of the third representation corresponding to the pixel is cleared to zero. The pixels on the boundary portion are traced while the content of the next pixel to be chained to in the third representation is non-zero. If the content of the next pixel to be chained to is zero, it is assumed that the trace of all the pixels on the boundary portion has been completed, and the trace of the boundary is ended. In this way, the boundary of the object is traced to obtain a chain code in the end.
According to the method disclosed in Japanese Unexamined Patent Publication No. SHO 63(1988)-301372, the following steps are carried out to trace the boundary of an object by image processing.
The above steps 1 to 3 are carried out in the same manner as in Japanese Examined Patent Publication No. HEI 05(1993)-71991. With respect to a pixel value in the third representation obtained in the step 3, a chain direction is searched for from the (k+2)th digit (if k is odd) or from the (k+3)th digit (if k is even) in a direction of increasing k, where k is the direction of the previous pixel. The digit which has been found out to have a value of "1" is decided as a chain code to trace the boundary.
In the prior art, image processing has been carried out by employing these methods to trace the boundary of an object.
However, the above edge-tracing method disclosed in Japanese Examined Patent Publication No. HEI 05(1993)-71991 frequently uses a look-up table and the logic circuit has a comparatively large dimension. Also, PROM to be used for table look-up operates in a comparatively low speed as a logic circuit. Accordingly, it has been difficult to achieve great improvements in boundary tracing circuits regarding the speed and the cost.
The edge-tracing method disclosed in Japanese Unexamined Patent Publication No. SHO 63(1988)-301372 requires a number of steps in searching for the tracing direction, so that it is difficult to achieve great improvements in the speed of the process.